package com.grad.webstudy.model.es;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: log日志储存
 * @Author: zjf
 * @Date: 2020/4/2 8:52.
 */
@Document(indexName = "log", type = "doc")
public class ESLog implements Serializable {

    @Id
    private Integer id;

    @Field(type= FieldType.Text)
    private String params;

    @Field(type = FieldType.Text)
    private String type;

    @Field(type = FieldType.Text)
    private String result;


    @Field(type = FieldType.Date)
    private Date time;

    @Field(type = FieldType.Text)
    private String requestUrl;

    @Field(type = FieldType.Text)
    private String status;

    @Field(type = FieldType.Text)
    private String username;

    @Field(type = FieldType.Text)
    private String ip;


    public ESLog() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
